package com.supinfo.bonjoursupinfo.models;

import java.util.Date;

public class News implements Comparable<News>{

    private int id;
    private String name;
    private String description;
    private String tel;
    private Date startDate;
    private Date endDate;
   
    public News(int id, String name, String description) {
		super();
		this.id = id;
		this.name = name;
		this.description = description;
	}
    public News(int id, String name, String description, String tel, Date startDate, Date endDate) {
		super();
		this.id = id;
		this.name = name;
		this.tel = tel;
		this.description = description;
		this.startDate = startDate;
		this.endDate = endDate;
	}
    public News() {
		super();
		this.name = "";
		this.description = "";
		this.tel = "";
		this.startDate = null;
		this.startDate = null;
		
	}

	public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	public Date getStartDate() {
		return startDate;
	}
	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
	@Override
	public int compareTo(News another) {
		return this.getStartDate().compareTo(another.getStartDate());
	}
}
